Well, you should be able to get an '08 BMW X3 3.0si with 70K-ish miles for around 20 grand, and that has a combined mpg of something like 20 to the gallon.
SUV won't fit (height wise) in garage.
Or, you should be able to get an Infinit G35 from '07 or so, a sedan, with around that many miles, for a few thousand under 20K,
I'm not impressed with Infiniti. It was my interest in a J class Infiniti that led me to my '01 Honda Accord EX V6 (the EX01 at the end of my username represents that car) that never gave me problems in 4 years of ownership.
though I don't know how important the BMW brand is to you.
It's the Ultimate Driving Machine.
Gas (especially if prices head back up), insurance, maintenance would increase with the BMW.
An '07 G35 would get around 20 city and 27 highway. Or I know that there's a BMW dealership not too far from where I work that has a certified pre-owned 2011 328i with about 50K miles for about 28K. Definitely shop around.
With Carmax, there's no negotiation. Matching wits with a used car dealer, not my preference. No offense.