UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7CumrYM1DWiSCxnS7YsbghcWRFOGlkbTRiTfLe6WxyA='
WHERE
key_id = '84876da43b808ff8ff6f8de99a65c798359058a9ad36c1016592545d7b66aa0e'
AND (
token = '7CumrYM1DWiSCxnS7YsbghcWRFOGlkbTRiTfLe6WxyA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)