Please post the full config of your system to give a full insight. It could that you didnt install the cooling systems properly but that doesnt sound like the case if you say the CPU is 40C. It could be the PSU if the power draw is higher than its output. If you can do a check on all your hardware as well as hardware failure could be a cause for this random reboot problem as well.