UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u3uAiELi+xGPVKaTEjyj7WEkpHApDkRfpMfymlImIf0='
WHERE
key_id = '17929dc27208e8317fd22fa343a4923893caa6340954db4ec70977f173611a39'
AND (
token = 'u3uAiELi+xGPVKaTEjyj7WEkpHApDkRfpMfymlImIf0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)