UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zTX3WZurqRFRoMGuijcMyanl3mqXQVCBQ5EsBnNvMNs='
WHERE
key_id = '7e2123c596af24e7eee54912aebeacc1a7576289a4b956d6acb1648d8f7bf419'
AND (
token = 'zTX3WZurqRFRoMGuijcMyanl3mqXQVCBQ5EsBnNvMNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)