You need to measure the heat loss in your mug around 50°C.
- Measure the mug capacity.
- Fill it with hot water or coffee.
- Insert a temperature probe and close the lid as much as possible. Use tape to stop any heat leaks.
- Record the temperature drop over time in the zone of interest.
Power loss (and power required to maintain temperature) will be given by
$$ P = \frac{ΔT·m·SHC}{t}$$
Where ΔT = temperature drop (°C), m = mass (kg), SHC = specific heat of water (4200 J·kg-1·K-1) and t = time (s).
I ran a test with 400 ml coffee (0.4 kg) and it took 21 minutes to cool from 53.5 to 52°C. Popping these into the formula we get
$$ P = \frac{1.5·0.4·4200}{21·60} = 2 W$$
This is the continuous power needed to supply to maintain 50°C in that much coffee in my cup. For two hours heating you will need a 4 Wh battery.
The laboratory kitchen setup.
I was agreeably surprised at how good the insulation was on the cup.
One thing that hasn't been covered is that you really want to suppress the heating until the temperature drops to 50°C. That implies some electronics or a thermostat in your slug.
Phase change heating
Note this section does not provide an electrical solution to the original question but the question made me look up the information and I offer it as an alternative.
During change of phase from liquid to solid a material gives off its latent heat. The temperature remains constant until the phase transition is complete. I did a quick web search for phase change materials with a phase-change temperature around 50°C and found an interesting article on Better Pizza with Phase Change Materials in which the author describes a student project to keep pizzas at eating temperature for an extended time.
Temperature versus time during phase-change cooling.
This article lead me to savEnerg which lists their PCM-OM55P as having a phase change temperature of 55°C which is almost perfect for this application. The latent heat is given as 210 kJ/kg. Time for some numbers!
Lets say we could tolerate 100 g of this material in our cup. (Density is 0.84 kg/litre so its volume would be \$\frac{100}{0.84} = 120 ml\$). If we heat it up and convert it to liquid then on cooling down it would give off \$210,000 J/kg \times 0.1 kg = 21,000 J\$.
Since a watt is one joule per second and we require 2 W to counter heat loss at 50°C then the time to make the transition is \$ t = {21,000\over2} = 10,500 s = 2.9 hours\$. This, I suggest, meets the OP's requirement.
There are a few practical considerations.
- The phase change material needs to be heated. This shouldn't be a problem if there is enough energy to make a mug of coffee.
- The PCM-OM55P max operating temperature is 80°C. I'll leave the reader to figure out how not to overheat the phase-change material.
- I have no idea what format the material is available in and how it would be packaged for this application.
On the positive side there are no electrics and it should have a long life. The best solution is the simplest one that works!