All he needs to do really is change the password, then whoever bought the old ps3 won't be able to log in to that account. The PSN account is just attached to email account, so yes you should be able to log in on any ps3 or ps4 with the login credentials. I would suggest changing the password first, though.