The built in hash should be a thread safe way to generate tokens.

Built in id would also work if the cursors are not deleted.