UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7bO+u3/91Jz8Q//rK6fslSvEZ6mtE5oYREzziHDqzTA='
WHERE
key_id = '0c11893fa6f4b35ae9603bae23b62086bfda689bd8ffd2ebf18ab8d6060d0e58'
AND (
token = '7bO+u3/91Jz8Q//rK6fslSvEZ6mtE5oYREzziHDqzTA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)