The way an instrument looks, is not necessarily an indication for its state. My T5 has quite some scratches on the body, due to frequent transportation and stage usage. And very bad paint by Yamaha... But the connectors, keybed, display, buttons etc. are all in perfect working order.
So you could look for external damaging like scratches, but I think that is not important. I'd test the machine on the following aspects:
- Do all connectors work (line-out, pedal switches, mic, USB etc.)
- Do all keys work, touch responsive and after-touch
- Do all buttons, controllers and lights work
- Is the display error-free
- Does the internal harddrive work
- And finally: is the sound correct
By the way, I've been using my T5 semi-professional for 4 years (twice a week transported, rehearsels, stage gigs etc) but technically speaking, it is still in 100% great shape.