Wee Mad Arthur is correct. A properly functioning and properly set heater will not overheat a tank, especially not to 40 deg C (presuming a normal room temp of about 20 deg C this time of year).
What oversizing a heater WILL do is cause excessive swings in temperature above the set point because the additional thermal mass of the larger heater and the residual heat in the larger heating elements will continue to transfer heat to the tank water after the thermostat has turned the heating element off.
Emma - A bit of advice. If you can return the heater, do so. Stuck-on heaters are probably the number one killer of reef tanks after complete power failures. I've been keeping reefs for some 30 years now, and 45 years for fish tanks in general. I would personally purchase an Eheim-Jager. Of all the brands I've had over the years, these have easily been the most reliable.
That said, it's extremely good practice to use a temperature controller such as an Inkbird in addition to the thermostat on the heater. The temp controllers tend to fail "off", which is the opposite of heaters, at least those with mechanical switches, which tend to fail "on". If you plug a heater into an inkbird, and set the heater's thermostat a bit higher than the setpoint on the controller, it's pretty unlikely for you to have a failure that leaves the heater on and fries everything in the tank. If the controller fails "on", you still have the heater's internal thermostat as a back-up safety device.