You should deactivate your PS4 so it's no longer associated with your account if you are selling or giving it away.
A PS4 can download games while it's in rest mode. PS4 games can also update while your PS4 is in rest mode.