UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LXQNj7Mn5LDg7MnemKfZa4ZH+RjGj4Mfs6ezAie9Q1c='
WHERE
key_id = '9a2480cc0da950e1e78bf0e6e9108281d6e6bc64f5432b972ad33e9fa3c9fdfc'
AND (
token = 'LXQNj7Mn5LDg7MnemKfZa4ZH+RjGj4Mfs6ezAie9Q1c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)