Have a look at Redis lock. Since you’re already using Redis, it should be a good fit for the use-case.