AND cur_random>{$rand} AND cur_user<>3903 AND cur_user<>6120
That's awfully specific to be hard-coding. :)
Add a settings variable that's a partial SQL query. I.e., in LocalSettings, put something like:
$wgRestrictRandom = "cur_user<>3903 AND cur_user<>6120";
then in DefaultSettings, put:
$wgRestrictRandom = "TRUE";
then the query becomes:
WHERE ($randonQuery) AND ($wgRestrictRandom)
Any individual wiki-specific hack can be done this way while keeping all source files identical except for LocalSettings.