UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1TdeUYHfXvkBsYAZWbLlzpPzpJO/ps2oUg/ieNONe/A='
WHERE
key_id = 'a11dd53b4d245fc98ed868ff83990549343c4d671bf9d7cde5c9ef274f693ee9'
AND (
token = '1TdeUYHfXvkBsYAZWbLlzpPzpJO/ps2oUg/ieNONe/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)