If it is out of warranty ie over 3 years.. even a day matters.. then you can try repairing it.
If it is a day under 3 years and you have applecare (computer, ipad, appletv) take it immediately to apple for replacement.
There are two main faults.
1. There is a problem with the fan.. and you have a real overheat.
Solution is to replace the fan.. but it sounds like your fan is running ok.. check the diagnostics via the airport utility with the airport open for editing. (Of course Apple removed this from Sierra version of AU.. I believe.. but it should still be in the iOS version).
So click edit here.
Go to the top menu. Diagnostics and Usage.
Then pick the thermal info at the bottom.. that is the most recent one.
There is a huge amount of info .. most of it unreadable to humans.
But the important ones are the fan speed and duty cycle.
Should match mine pretty well.
And Tmps .. again compare yours to mine.
This is not something you can look at .. but here is my actual numbers.
Accl X-Axis: 1058 0 0 0 0 none
Accl Y-Axis: 49 0 0 0 0 none
Accl Z-Axis: -3 0 0 0 0 none
Accl Temp: 18 0 0 0 0 none
Fan_rpm: 1747 RPM
T_hdd: 0.000 degC
Fan_dcy: 57 0 0 0 0 none
T_internal: 38.000 degC
T_external1: 36.125 degC
T_external2: 43.625 degC
T_external3: 44.875 degC
2. The other major fault is the sensor.
This does seem to happen to a reasonable number of units..
To fix the sensor is a major piece of work and I have been semi-successful.. in that I killed it being a problem.
See the work I did on a TC with a racing fan and overheat.
Repair AC version Time Capsule or Extreme - LaPastenague