I think the process will need to be more involved that what you have stated. As I read it, you are looking for a single molecular compound which is stable at 25°C, but which decomposes rapidly at 40°C. In general, for simple molecular reactions, the speed of reaction will approximately double with a 10°C increase in temperature, so for a single molecule decomposing by purely kinetic processes, you can really only expect about a 2.7-fold increase in decomposition rate going from 25° to 45°. That means anything unstable enough to decompose in minutes at 40°C will decompose in tens of minutes at most at 25°C - probably not stable enough for your application.
You will probably need to look for either a catalytic cascade reaction or for an outside process for your decomposition. Body chemistry changes as body temperature rises - heat shock proteins are formed inside cells, sweat is produced on the skin, muscle movements bring capillaries closer to the skin, and so on. A chemical which responds to physiological changes might be more sensitive than one responding purely to temperature.
Another possibility would be mixtures that respond to different temperatures by forming different liquid-crystal structures. These are frequently used in the color-changing thermometers and "mood rings". These are strictly physical changes rather than chemical changes, however.