UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UJZHybhgoxhZHmjvi3jAjZS+5j34SYTxYt8oRfqD6i0='
WHERE
key_id = '29ace7f28e347ee0ecbcd5f350ef969185ffe0f0b11a49708cefdb090e67c717'
AND (
token = 'UJZHybhgoxhZHmjvi3jAjZS+5j34SYTxYt8oRfqD6i0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)