UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MSYd6YVQVnHlVxkyAZQ1/lXNQUiYAoyQf3abD4uvMAg='
WHERE
key_id = '33d29178435232f7b0ec3d027ed242785b64fcdf97ec4868f0e3e90c8c1b127a'
AND (
token = 'MSYd6YVQVnHlVxkyAZQ1/lXNQUiYAoyQf3abD4uvMAg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)