UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IeN/Q4GFGnaFB4QSKDbR5Jcfz2CqTrIwYEHj0RdAS6A='
WHERE
key_id = '6097a8623ad14ef327d5bd2340dc88d51d7cfa60d1ab102a7f1f16df0204453a'
AND (
token = 'IeN/Q4GFGnaFB4QSKDbR5Jcfz2CqTrIwYEHj0RdAS6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)