Some of the E60 M5's have had gearbox and diff issues. Back in 06 I was headed to my dealer and there was a BRAND new M5 stuck on the overpass just about a mile from the dealer. When I got to the parts counter I mentioned there was a pretty nice BMW sitting on the bridge and the parts guy said "yea, the owner just got here, it is stuck in 3rd gear". That was the SMG of course.
But all in all, it is an amazing car. Get the warranty and enjoy!