You don't have to `find` before you create. You have `unique` set on the learner model, so you should just try to create immediately and check the error to see if you have a duplicate key error (I believe it's code 1062 if you want to check specifically for that error). This will prevent the race condition you allude to below.