Visa days are counted on an "every date" basis. Even if you get stamped in at 23:55 on June 3rd, June 3rd will be counted as a full day. The obvious thing to do in a case like this is to hang back, take it slow, take an extra bathroom break or otherwise kill some time until it's past midnight. This is only adviseable when you're within 30 mins of midnight.
BTW - according to the signs posted at BKK during my last arrival earlier this month, the first day of an overstay is not a problem, and not subject to a fine. The second day costs you 1000 THB and each subsequent day costs 500 more.
So you're safe with your plans either way. Otherwise, I would recommend taking a visa run to Kuala Lumpur in Malaysia - AirAsia usually has some great fares and KL is a fun city to be in. Plus (relatively) cheap hotels. Since you've left the Kingdom, you get a new visa for a full 30 days when you check back in. This works just as well at any land border or port, and there is a whole "visa-run" industry out there. They do runs to Myanmar, Cambodia (expensive) and, of course, Malaysia. You could also consider a quick flight to Singapore, since SIN-BKK is well served by LCCs.
PM me for details if you like.