@Henry *****
You can do it together, but it might end up causing you issues because depending on your immigration office, they might be handled by different departments/counters. Which means they won't let you apply for your extension before you go and get the stamp moved. Which could take hours or the entire day. That could mean you can't apply for the extension that day because you had to get the stamp moved first.
The officers at the airport can also get a little annoyed if you try leaving Thailand with an extension and a new passport, because they know you should have gone and gotten it moved already.
So technically, you can do it together. But to avoid any potential issues it's best to do it as soon as possible.