How to check a used lens
Look through it against a bright light for haze, fungus, and scratches, then check the focus, the aperture, and the mount.
The glass
Shine a flashlight through the lens from behind. Haze looks like a fog across the glass. Fungus looks like fine threads or branching spots. Light dust is normal and rarely shows in pictures.
Small cleaning marks on the front element seldom matter. Deep scratches on the rear element can.
The mechanics
Focus should turn smoothly from end to end with no grinding or loose spots. The aperture blades should be dry, with no oil, and should snap closed cleanly.
Check the mount for wear and make sure the lens locks firmly onto a body.