Is there a way to bulk update 40k user's usernames?

I found this solution but username field cant be upserted that way.

Do I just need to call the update user api about 40k times and manage rate limits?‘’

We have an enterprise account so that should hopefully help with rate limits?