"If you need locks only on a best-effort basis (as an efficiency optimization, not for correctness), I would recommend sticking with the straightforward single-node locking algorithm for Redis (conditional set-if-not-exists to obtain a lock, atomic delete-if-value-matches to release a lock), and documenting very clearly in your code that the locks are only approximate and may occasionally fail."
The redis server reboots. Simple as that. Redis is very very rarely run in a transaction mode that guarantees consistency across reboots (and it's rare enough to doubt the code works even when it is set to the necessary mode). If you're using redis in this mode, it's significantly slower than a proper database, so don't do that either.