For complex polynomials of many variables the following theorem holds:

If $p(x_1,...,x_n), q(x_1,...,x_n)\in \mathbb K[x_1,...,x_n]$, where $\mathbb K=\mathbb C$, are polynomials such that $p(x_1,...,x_n)$ is irreducible and for all $a_1,...,a_n \in \mathbb K$ $$ p(a_1,...,a_n)=0 \Rightarrow q(a_1,...,a_n)=0, $$ then $p(x_1,...,x_n) | q(x_1,...,x_n)$.

I look for a counterpart of this theorem in the case $\mathbb K=\mathbb R$ for polynomials of the second order. Some additional assumptions are necessary, because for example for $p(x_1,x_2)=x_1^2+x_2^2$ and $q(x_1,x_2)=2x_1^2+x_2$ the above theorem is not true.

Is it maybe true under additional assumption that $p,q$ are the second order and that

there exists a $y=(y_1,...y_n)\in \mathbb R^n$ such that $p(y)=0, grad f(y)\neq 0$ ?