UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WKbNFEySkeI103+lIW65zBp2vnmr4T9H09dHCkJJqAY='
WHERE
key_id = 'c552472417192f42388365491dc8d39c04a9d580f9ad31bc4543b581a8d99848'
AND (
token = 'WKbNFEySkeI103+lIW65zBp2vnmr4T9H09dHCkJJqAY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)