UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CdsWNoX8K1m8WFb3oh9l4IfLYTVng22QYTQ1LrWlekc='
WHERE
key_id = '2b4d2706c2051d9a3b05c6462a4d06f33c0f8dd76281126f792e85fed17943c3'
AND (
token = 'CdsWNoX8K1m8WFb3oh9l4IfLYTVng22QYTQ1LrWlekc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)