This happens to me randomly on my sig rig. Drives me insane. I'm running everything stock. Have run mem-test overnight, no errors. Have run prime 95 for a long time, no errors. Temps are low. Flashed to the latest bios, no change.
What happens to me is that it either locks randomly while inside windows (just sitting at the desktop or browsing the web), or it locks on login after entering my ID and password. Once it does either of those just once, it will continue to do it every time I re-boot. I messed around with it a lot and found the only thing that would break the cycle 100% of the time was to unplug, move the cmos jumper over, hit the power button on the computer a few times, then put the cmos jumper back, plug in and turn on. If all I did was go into the bios and reset everything to stock, that wouldn't ever fix the issue. I had to totally clear it.
I figured it had to be the MB or my SSD. Just RMA'd my MB, got the replacement in and within a week of swapping it out, the lock happened again. The solution was the same.... reset the bios with the jumper. I guess it has to be my CPU or SSD at this point. I see you aren't running an SSD though. Not sure if your problems are the same as mine but hope this may help you.