A visa exemption stamp, extended thirty days until 22 September is valid until 23:59 on that day, correct? You can fly out of the country on the 22nd and not have overstayed. Correct?
TLDR : Answer Summary
Yes, a visa exemption stamp that has been extended for thirty days is valid until 23:59 on the expiry date. Therefore, you can leave Thailand on the expiry date without overstaying.