Redis key locking implementation for hiredis C library