The effect of hyperfine interaction on the lifetime of the 3s3p 3P2 level of Mg-like ions