Check in the BIOS your voltage for the CPU may be too high??
Your CPU has an internal temperature protection that throttles the load or shuts it down completely before overheating. I believe that in your case the heatsink was not mounted correctly or the heat paste was not applied correctly (maybe not at all?). After repair, ask the shop to run a CPU stress test, e. g. Intels tuning utility which it should master for 1 hour without failures.