At atm look for change user id/pin. There is a menu to follow there. You can also ask the staff inside. The first time I did it, they came outside and showed me what to do at the atm.
I recently changed my phone. Everything was done at the ATM outside the bank. You just as for a new code and its printed on the statement paper. It only lasts 12 hours. But that's plenty of time.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.