A used but newer camaro SS or couple year old mustang 5.0, both with 400 plus hp and you can get much more car for your 30k. You could get a 2 year old stang 5.0 which is essentially as fast or faster than the m3. Obviously style and finesse etc will be different but performance it will be a great buy.
Honestly an out-of-warranty M or AMG is just too expensive for you. A 30k limit is not someone who can afford an M or AMG, used or not given used there is very high cost maintence and repairs