If your stamp runs out - for example - on day 15th, and you are denied the 30 day extension and just got 7 days to leave the Country, these 7 days starts on day 16th (in our example case) and runs out on day 22nd (last day you are allowed to stay). No matter when the 7day permission is stamped in your passport.
And I repeat that the Consulate (Penang) asks a bank statement showing 50k in order to release a (second) tourist visa, and Immigration border (Sadao) asks 20k cash in ordee to let you enter the Country.
Two different financial proof, one at Consulate and one at border
For tourist visa, Penang ask return flight reservation. If you don't have they should charge you 1000 baht extra.
Don't get confused between the financial proof at Consulate (it is at least 50,000 thb in a bank: show an updated statement) with the financial proof they ask you to show at Immigration point (Sadao), that is 20,000 thb CASH