Try closing other background apps, if you have any running. Dim the brightness, turn off any unnecessary radio functions (NFC, Bluetooth, WiFi or mobile data where relevant). What are you trying to play? 40C isn't even that hot, although I am comparing it to desktop CPU temperatures.