Im not recommending to use int/bigint as ids at all, cause you will get into the same problem when you will want to scale your DB. Better use uuid or other hash function that will guaranty uniqueness around all DBs instances.
Also if you want to use quick altering you should use async index update.
As for your problem i think you can fix this with such steps:
1) create second unique index
2) lock tables for updates
3) drop primary constrain on former index
4) rename new unique index to ‘id’ or how you name it
5) add primary constrain to new index
But this should be tested, cause i don’t know if this will be faster then data copy.