They're pretty robust, check for usual signs of abuse. If going for an early car (pre-June '03 IIRC) check for the required recalls.
At about 40K to 50K they will generally need a fair bit of cash: Inspection II service, brake discs, maybe shocks etc. Will cost a fair bit.
However, the most noticeable item that shows wear IMO is the rear trailing arm bushes. They wear quite heavily, but get these replaced and the car can feel like new again. If doing it, it's well worth slapping a limiter kit on there too as that will reduce wear going forward. Change other bushes regularly too. OEM are good enough IMO, depending on your use.
EDIT: Also meant to add, the M3 can suffer from the problem of snapping springs fairly regularly. I had 6 in 4 years. Also, top mounts can go too and the rear handbrake mechanism sometimes needs attention (listen for a squeak as you get out of the car as a common indicator). All easily sorted though.