I haven't read any of the other replies in this thread but in my opinion these are your real options.
1. E90 isn't realistic. 35k out the door can get you a 50-80k 2008 but I wouldn't consider this realistic because you will either need to purchase an extended warranty for $2000-$3500 or set aside $2500 - $8000 for emergency repairs. Yes I said NEED. The vehicles don't have many problems but protecting yourself would be the frugal thing to do. E90 is NOT an option in my opinion.
2. A later year 2004-2006 E46 M3 with relatively low mileage such as 20k - 50k can be had around $24000 - $30000 depending on the car. With this you will NEED a warranty. I bought one in great condition however when i DID have my two repairs they were both around $2500 which were covered by my warranty. You can get one in great condition from someone who took really good care of the vehicle. This will be your cheapest option and can be had less than $30000 with EVERYTHING and maybe even some mods. Remember E46 M3s are approaching 10 years old. No matter how well it has been maintained things can start to fail with that age. In this situation you would be stupid to not get a good extended warranty.
3. 335i should be your second option after E46 M3. Why? Because theres a possibility you wont get as good an example as you would get with the E46 unless you are willing to spend all the way up to your 35k for the vehicle. A BETTER example of an M3 can be had at 5k - 10k less... OUT THE DOOR... If you shop them in the same price range, the 335i will have the same amount of miles but they would have been accrued in a shorter amount of time. Additionally, when stock, the M3 is faster and definitely a more exhilarating drive. The 335i will offer more creature comforts than even a fully loaded E46 M3 including better nav, usb port, etc.