UPDATE product
SET p_ftime = CASE WHEN p_ftime is not  NULL THEN p_ftime ELSE getDate() END,
p_state = 1
WHERE p_id = '1001'