Think you said it best in your post - you need a Thermos.
As in an actual "Thermos" branded one.
I got one of their pint sized food flasks with a folding spoon and screw on cup/lid cover that's so efficient I've got to make my coffee the night before if I want to drink it in the morning, or add cold water if I forget, otherwise it's only cool enough to drink about 12h later.