@Holly ********
, post in a Chiang Mai related F/B group and you'll get better answers. Try the post in Chiang Mai ExPats, or Chiang Mai Digital Nomads. Someone will know the real answer
I am not sure that the re-entry permit counter there is open all the time.
BUT
the up side is the immigration office is right by the airport so you could go there BEFORE you went to the airport to catch your flight. ;)