Sounds like you may have a spot of bother unless you're husband got a Multy entry non b .
If you are on overstay then I wouldn't use the Ranong Border to do a bounce as there's no access to an embassy or Consulate. You might want to fly to Penang, Kul or somewhere nearby so hubby can get another non b