low 20K, you could get a very good condition 1999-2000 328 or 323
high 20K to 30K, you could get a very good condition 2001-2002 325 and if lucky you might find 330 in that price range too.
with CPO you are sort of covered on all major repairs. all you have to worry is the maintence. (don't quote me on CPO covered, you will have to ask the dealer what's covered and what's not)
without CPO then you might consider Ext Warranty offered by BMW dealer as long as the factory warranty hasn't expire.
oh forgot to tell you, BMW has a higher maintence cost but they are german engineered and built (some africa) so they have excellent quality. and all cars will have problems when they are in a higher mileage and also it depends a lot on how the previous onwer has use them.
happy shopping,