Fix locking with multiple attempts. We were not properly catching RedisL...

...ockException. Also fix so that we actually do max_attempts tries before throwing the exception.