Hey MJAU.
Your problem could be one of many, and likewise when it comes to the solution.
IMO it clearly sound like a hardware problem, rather than a virus.
Your CPU will shut down if its overheated, which in general means if you have a heating problem to your CPU, you have the same effect as you're seeing on your computer; shuting down within seconds.
Before starting an everlasting seek&destroy for a virus, i would first take out the CPU, beneath the fan, and clean it properly before adding a new layer of cooling paste.
It would at least exclude the heating issue, which for your symptoms is very typical.
Abraxas