UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j/1x1y5bLBO6ehDw+Mc6l8zo0BlHYyyguYDLhKTjMzw='
WHERE
key_id = '0da2d4fab0953fe14cd5fb2bf8f70b4461926576a88fd0657b13372178d7c2c6'
AND (
token = 'j/1x1y5bLBO6ehDw+Mc6l8zo0BlHYyyguYDLhKTjMzw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)