Install this lua script into redis server.
redis-cli SCRIPT LOAD "$(cat redis-multilock.min.lua)"
// This command return your script name for execute
For example is your lua hash : e53b6e18671f437fd1eb0012776e1cbb02d734c1
// redis-cli EVALSHA e53b6e18671f437fd1eb0012776e1cbb02d734c1 {KeyCount} {Key, [Key ...]} {Timeout Millisecond}
redis-cli EVALSHA e53b6e18671f437fd1eb0012776e1cbb02d734c1 3 "key:1" "key:2" "key:3" 10000
If command returns 0; This means all these keys are locked from the moment you run the command ...
If command returns 1; This means you have to wait for all the keys to be unlocked