As you are using an All-In-One computer, taking your PC apart may be less well-documented than a more common laptop or a desktop. Use software like HWMonitor to determine whether it is the CPU that is overheating. If it is, try reapplying thermal paste to the heatsink and fan attached to the CPU.