UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '38K+4+G4Vtp4XOR40koVric+/B1XwyN8pprjVrJQWZo='
WHERE
key_id = '401558fd63353c6ab80ee2acbf65f2eb7e374d1389f464ae8ce2241474355c67'
AND (
token = '38K+4+G4Vtp4XOR40koVric+/B1XwyN8pprjVrJQWZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)