@Leigh ********
You have to go into the Malaysia so go though immigration and then see if they will let you leave the same day. People have been caught and charged with overstay in Thailand only leaving Thailand and not entering another country. Enjoy KL