Let $X$ be a smooth projective variety over a field $k$. We know that the deformations of $X$ over $k[t]/(t^2)$ are parametrized by $H^1(X,T_X)$; given such a deformation, we know that it can be extended over $k[t]/(t^3)$ if and only if the corresponding element $\xi \in H^1(X,T_X)$ satisfies $q(\xi )=0$, where $q:H^1(X,T_X)\otimes H^1(X,T_X)\rightarrow H^2(X,T_X)$ is the cup-product deduced from the Lie bracket on $T_X$.
Now consider a closed subvariety $Y\subset X$, say smooth. Again, we know that the deformations of $Y$ inside $X$ over $k[t]/(t^2)$ are parametrized by $H^0(Y, N_{Y/X})$ (the normal bundle of $Y$ in $X$). Given such a deformation, how can we express that it extends to over $k[t]/(t^3)$? What would be the analogue of the map $q$?