#1. First thing is pull the relief valve. If it hisses, you know it was sealed and will hold pressure. IF it doesn't hiss, you'll need to test it for pressure. It could be busted or it might just be bad seals.
#2. See if there is liquid inside, if so, dump it -- take a smell and make sure it isn't chemicals, gas, or anything else stupid that people might store in kegs. Inspect the inside. There should be no rust, deep scratches, or strange discoloring inside. Check the welds at the top of the inside. They should be smooth and rust-free. If there is, pass on it or get it for dirt cheap if you want to try to save it. Also look for grime or egg casings inside if it wasn't properly sealed. For $40-$50 bucks you should get a squeaky clean keg. If it isn't and it'll require some labor to get it clean, ask for a lower price.
#3. Inspect posts and lid seals. Cracked rubber usually means a tear-down and full gasket replacement. While not really a big deal, it's still labor and money. If it requires a tear down and gaskets, I'd probably ask $30 for it.
Even if I can get a perfect keg, I always do a tear down and seal replacement just for good measure. I also run a snake through the spear and bake it in the oven to kill any nasties that might be living up there out of sight. If you get grime, a hot Oxy-Clean soak usually does the job. If not, a carboy brush will get the rest. Put it back together, I even teflon all threads for good measure, and sanitize and it's ready to go!