My first mountain bike was an ex-hire giant from a trail centre.
I hadn't had it too long before it needed a new bottom bracket, cranks, rear cassette etc. They don't get much TLC, so the drivetrain components take a hammering. Over time I also upgraded bits I broke, and a mate still rides it now without any new bits.
That said, if the bikes are sold after 30 hires, they're probably a good deal. I think the bike I bought was a year or two old at least when I got it.
I suspect if you're asking on here, you don't have any mates who know about mountain bikes to look them over for you. So I would suggest taking along a ruler and applying the technique detailed at the bottom of this page:
http://www.sheldonbrown.com/chains.html
Basically, the entire drivetrain – chain, cranks & cassette wear in unison. If the chain is bad, the entire rest of the drivetrain will be bad. And replacing the whole lot will cost £100 or so.
Beyond that, rock things that have bearings in them to feel for play – if the wheels, cranks or fork bearings have play, you're going to be spending money again.