UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4oXwZHPodN/brvlASL4DqwRtsvc9ff29l9lxOGleviY='
WHERE
key_id = '2a51302e1323c95c5983c3154a5d7b992aca8a67db649d090ee9ff28639f6e99'
AND (
token = '4oXwZHPodN/brvlASL4DqwRtsvc9ff29l9lxOGleviY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)