resetUserTokens.php calls User::saveSettings(), which is fast enough for most things, but far too slow for the task of modifying every user in the database. It may even have scary side-effects like preference normalisation.
Also, the main SELECT query is not batched and may use a lot of memory.
What's needed is something that just does updates user_token for each user and nothing else. Calling authentication plugin hooks while this is going on is probably harmful: CentralAuth can more efficiently update gu_auth_token in a script of its own.
MySQL doesn't provide a particularly convenient method for updating multiple rows at a time with different literal values, but something like this seems to be possible:
CREATE TEMPORARY TABLE new_tokens (nt_user_id int, nt_token varbinary(32));
INSERT INTO new_tokens VALUES (...), (...), ...;
UPDATE user SET user_token = (SELECT nt_token FROM new_tokens WHERE nt_user_id=user_id) WHERE user_id BETWEEN ... AND ...;
Maybe if the rows were updated in batches of 50 or so, a large wiki could have its tokens reset in a reasonable amount of time.