Although those might not be resource intensive games, it's possible that your CPU or GPU is overheating while playing and causing the shutdown.
Check the event viewer to see if there is an event telling why it shut down. You can also try playing with the side cover removed from your PC case. If you have a small fan that you can point to the inside of the case while the cover is off may help too. If you can play with no problems while the side cover is off, then you have a cooling problem. If you case can accept more fans, then buy some and install them.
Another thing to check for is dust in your CPU and GPU fans/heatsinks. Get a can of compressed air and blow the dust out. If you case has filters, clean those too.