The point has already been made - most sportbikes succumb to their death by crashes and not miles, and how it was ridden and maintained plays more of a factor than the miles. Yeah, things break down from wear and tear but that's a 100,000 mile plus issue on an older bike, not a 40,000 mile issue on a two year old bike.
The best test you can do for any engine is just to start it up, cold, and watch the exhaust. If you see little puffs of white smoke on startup that means the engine is worn (rings and/or valve guides) and is in need of an overhaul. Modern engines, including motorcycle engines, are capable of making well over 100,000 miles before that happens.
The things that kill engines are:
1. Hard riding after a cold start. Most of the wear in the engine occurs on startup, and high performance engines are especially prone to damage if ridden hard after a cold start. The engine should be warmed up to at least 100 degrees, then ridden gently until it reaches operating temperature. Then wind it up.
2. Revving to redline. These engines can take a beating, and an occasional trip to redline, but the more time your engine spends near that, the shorter it will live. Let's face it - you're already past the powerband if you're at 12,000 RPM, but if you keep from going to 14,000, you will save a ton of wear on the engine. It's the last one to two thousand RPM that will rapidly accelerate the wear on your engine.
3. Cheap or incorrect oil. Regular oil changes with good oil is important if your engine is going to last. A full synthetic oil can pretty much make wear just stop.
4. Long periods of inactivity. The majority of bikes don't get ridden much, often just on the weekends and sometimes never during the winter. Parts in engines corrode if they sit too long. That's why the above mentioned 900RR basically had no wear after 100,000 miles - it was ridden all the time. A five year old bike with only 5,000 miles on it should be very suspect.
My 05 750 just crossed 26,000 miles on it. I maintain it well, and once it has 50,000 on it, I will argue it will be a better bike than a poorly maintained bike with 5,000 miles on it. I'll probably sell it at some point, but I'm not going to take a lowball offer on it.