@Kami *****
*** if you entered using a METV on May 27th, you were stamped in until July 25th
You need to leave until midnight July 25, or buy a 30 days extension.
However, since you want to make a trip to Kuala Lumpur on July 25th, just go ahead and fly, do NOT buy the extension as this would be useless.
Despite the wrong info someone else posted, You can theoretically buy a 30-days touristic extension for 1900.- THB on EVERY Immigration on top of EVERY 60-days stay permit you get stamped during the visa validity period (until November)
When you return to Thailand from the Kuala Lumpur trip, you will get stamped in for the next 60-days stay permit