Xbox shutting off by itself

Hello, My xbox 360 S keeps shutting off after 10 mins of it being on. I haven't played it for 2-3 years but I got a new cord for it and everything. But it keeps shutting down. I clean it up from all the dust and stuff but it still shuts down. Can anyone help me or know what's going on? Thank you!

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

Does the console shut off during gameplay, or just on the main menu. If it isn't in a well ventilated area it could be overheating whilst under load.

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0