UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JUaGUxg0sxwlpUPaCd0XZv+wQ1I3uk/nzpgDnvHUw68='
WHERE
key_id = '4b7260592eccf4ebe4624985a5be242723dd94f3d0f4314a253dd1b3f1c05422'
AND (
token = 'JUaGUxg0sxwlpUPaCd0XZv+wQ1I3uk/nzpgDnvHUw68='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)