@Alexandr ****
then (as I surmised) you have an EXTENSION OF STAY not a visa :O
You need to take BOTH passports to the immigration office and transfer your stamps.
AND remember, just leaving on the date the work permit and extension expire does NOT officially cancel either of them SO if you ever intend to work here again you need to go cancel your work permit at the ministry of Labour and your extension of stay at thai immigrations BEFORE you leave the country