How can I change the order of extra attributes in the Channel Box?

You can’t change the order of extra attributes in the Channel Box. Maya requires the order to be the order in which they were created.

You could write a script that reads the current attributes, deletes them all, and adds them again in the order you want. However, this would break connections with expressions and other objects.