Best way to check is to be in the bios hardware monitoring section, watching for a temp change just before the system shuts down. If the temp is rising, then you have poor contact between the cpu and heatsink, or the heatsink is inadequate for your cpu.