Another idea: put this on a long-running worker that can chomp through the sessions in chunks.