We'll if you're saying that it shuts down less when it's cooler, it's probably the heat.
Take a regular house fan that you got, and point it AWAY from your laptop, so that it sucks the hot air from your laptop. See if it helps. Then have the fan pointing at the laptop to cool it too. If it doesn't shut down then open it up, dust it out. Make sure all fans are running and if they are. Close it back up, see if it shuts down then. If it doesn't you're good. If it does, try to buy a Laptop cooler
to put under your laptop. If it STILL shuts down then, then we have a problem. But I got a feeling the first step will fix it