Well you could quickly start checking by running the following manual query from ACP, before and after you run the script:
PHP Code:
select username, options from user where userid=<userid>
Replacing the <userid> by the userid you want to modify (maybe also run it for the 2 higher userids based on the other servers). See if and what output you get.
This would be the first to start working on a solution.