OK, I'll start by saying that this "knowledge" is from 5 years ago and may (a) not be remembered exactly or (b) have changed since then.
When I went on short (~1 week) trips to England and Canada, I believe the customs instructions said that you needed to have at least 6 more months before your passport would expire. Like I said, this may have changed or it may not even have ever applied to Mexico (or even Canada since I did the trip to England first so I had 9+ years until expiration for Canada).
If you have a few weeks, you can expidite an initial passport application (I think mine was less than 3 weeks). I'd bet that a renewal takes less time. In any case, the cost to get quickly renewed is likely less than the cost of a significant delay returning to the USA (hotel, meals, missed flights, etc.).
If I were you, I'd rather be safe with a renewed passport than gamble with TSA &/or customs.
-Rob