Dynamics of a movable micromirror in a nonlinear optical cavity