I tried the script below, which renders the mesh correctly in blue, but opacity does not work. It does show the opacity value in the USD properties though.
color = [(0, 0, 1)]
opacity = [0.1]
UsdGeom.Primvar(mesh.GetDisplayColorAttr()).SetInterpolation("constant")
UsdGeom.Primvar(mesh.GetDisplayOpacityAttr()).SetInterpolation("constant")
mesh.GetDisplayColorAttr().Set(color, time)
mesh.GetDisplayOpacityAttr().Set(opacity, time)