$\textbf Z[\sqrt{pq}]$ is not a UFD if $\left( \frac{q}p \right) = -1$ and $p \equiv 1 \pmod 4$.
If $$\left(\frac{q}{p}\right) = -1,$$ that means that $q$ is not a quadratic residue modulo $p$. That much is obvious, right? It also means that $q$ is not a quadratic residue modulo $pq$ either. Thus, in your example, since 2 is not a quadratic residue modulo 5, it can't be a residue modulo 10 either, and is therefore irreducible.
Since $q$ is irreducible, it's not divisible by $\sqrt{pq}$. So we conclude that $pq$ has two distinct factorizations in $\mathbb Z[\sqrt{pq}]$: $$(\sqrt{pq})^2 = pq.$$
Well, that might slightly wrong if $p$ can be broken down, but $q$ can't. In order to present this answer first, I have not actually pondered the significance of quadratic reciprocity to your question.
Is this from a textbook? If so, I would wager credits to navy beans that they want you to use quadratic reciprocity.
Suppose $q \equiv 1 \pmod 4$ as well. Then we have $$\left(\frac{p}{q}\right) = \left(\frac{q}{p}\right) = -1.$$
We could invoke either $-p$ or $-q$, but since the fundamental unit $\eta$ of $\mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ has norm $-1$ (Theorem $11.5.7$ in the), if there exists some number $x \in \mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ such that $N(x) = -p$ or $-q$, then $N(\eta x) = p$ or $q$, contradicting our Legendre symbol calculations.
We conclude that $p$ and $q$ are both irreducible. But then $p \mid (\sqrt{pq})^2$, $q \mid (\sqrt{pq})^2$, yet $p \nmid \sqrt{pq}$, $q \nmid \sqrt{pq}$. Therefore $\mathcal{O}_{\mathbb{Q}(\sqrt{pq})}$ is not UFD.
I hope this is enough of a hint for you to figure out the case $q \equiv 3 \pmod 4$.
Let $N$ denote the usual norm, i.e. $N(x+\sqrt{pq}y) = (x+\sqrt{pq}y)(x-\sqrt{pq}y) = x^2-pqy^2$.
The hypotheses are that $\left( \frac{-1}{p} \right) = 1$ and $\left( \frac{q}{p} \right) = -1$, or equivalently that $\left( \frac{\pm q}{p} \right) = -1$, or equivalently that $x^2\equiv q\pmod{p}$ and $x^2\equiv -q\pmod{p}$ are not solvable in the integers.
If $\alpha = x+\sqrt{pq}y\in\mathbb Z[\sqrt{pq}]$, then $N(\alpha)\equiv x^2 \pmod{p}$, so the hypotheses imply that neither $q$ nor $-q$ is a norm element. Hence $N(q) = q^2$ and $N(\sqrt{pq}) = -pq$ are not expressible as a product of two nonunit norm elements. This proves that $q$ and $u:=\sqrt{pq}$ are irreducible elements of $\mathbb Z[\sqrt{pq}]$. Since $u\cdot u = p\cdot q$, if $\mathbb Z[\sqrt{pq}]$ were a UFD we would have to have that $u, p$ and $q$ are all associate primes. But this is not so, because their norms are not associate integers.