It also shuts down while I am in BIOS after a couple of minutes.
I made a bootable USB, formatted my C drive and reinstalled windows. This time the machine worked for like 10 minutes. I only had time to install Chrome and then it shut down. Now its back to where it shuts down in 1 minute.