local function force_release_lock (key) redis.call("DEL", lock_key(key)) end local function force_release_locks (keys) for _, key in ipairs(keys) do force_release_lock(key) end end local function remove_and_force_unlock(key) local existing_entry = get_existing_entry(key) remove_entry(key) if existing_entry then force_release_locks(existing_entry.additional_lock_keys) end force_release_lock(key) return { "ok" } end return scriptResult(remove_and_force_unlock(KEYS[1]))