Fix locking with multiple attempts.

Were not properly catching RedisLockException. Also fix so that we actually do max_attempts tries before throwing the exception.