Unless the heat mat was over 100 degrees and covered the entire bottom of the cage so the snake couldn't escape, or your room is 50 degrees and the UTH wasn't working at all, I would guess that your analysis of the situation is correct, and the snake was unwell when you got it.
Did you purchase it locally, or was it shipped? If it was shipped without a heat pack, that might explain it too, it's been pretty chilly some places.