UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LctLUkTUk2+MhJtCQDxFzy/qkBLI7OXIk8KwzEviUyI='
WHERE
key_id = '79639078fcc2171ca806a34ecae3cc71ef4a2ceb4e235b5cd05c403fe510d60b'
AND (
token = 'LctLUkTUk2+MhJtCQDxFzy/qkBLI7OXIk8KwzEviUyI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)