UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4CRNV7BkfojfJR+/XfY66zWLJPO1zdfwULjvRAOupeY='
WHERE
key_id = '214979302250a440026b1bf1b29bbd97e755b9ef6b238e2ce724c2ab1e7d1807'
AND (
token = '4CRNV7BkfojfJR+/XfY66zWLJPO1zdfwULjvRAOupeY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)