UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AVBtZuDoqmrFQe7KcR61keJ4KBF6KT339ilo4bIsJfY='
WHERE
key_id = '43ba2abfeaf0570e22b6a561ef6b40cb7ff70f8a2665e03c5460d8f6555817fd'
AND (
token = 'AVBtZuDoqmrFQe7KcR61keJ4KBF6KT339ilo4bIsJfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)