update process_batch_of_users function to do one update_query per user instead of two