It is well known that $3$-cocycles in $H^3(\mathbb{Z}/n\mathbb{Z};U(1))$ are of the form
$$w(a,b,c)=\exp(\frac{2\pi ik}{n^2}a(b+c-[b+c])),$$
for $k\in\mathbb{Z}_n$, $a,b,c\in\mathbb{Z}_n$ and $[b+c]=b+c\mod{n}$.
(See https://mathoverflow.net/questions/121065/explicit-3-cocycle-of-a-cyclic-group)
How do I show that this is indeed a $3$-cocycle?
According to me, the identity that must be shown is $(\delta^3w)(a,b,c,d)=0$.
Here I use $\delta^nf(x_1,...,x_{n+1})=f(x_2,...,x_{n+1})(\Pi_{i=1}^nf(x_1,...,x_ix_{i+1},...,x_{n+1})^{(-1)^i})f(x_1,...,x_n)^{(-1)^{n+1}}$.
Since we have a product of exponentials, we can only regard the sum of the terms between brackets. Thus we will only look at $w'(a,b,c)=a(b+c-[b+c])$ and we want $(\delta^3w')(a,b,c,d)=0\mod{n^2}$.
We then obtain $$\begin{align} (\delta^3w')(a,b,c,d)=&w'(b,c,d)w'(a+b,c,d)^{-1}w'(a,b+c,d)w'(a,b,c+d)^{-1}w'(a,b,c)\\ \end{align}$$ $$\begin{align} =b&(c+d-[c+d])+\\ -(a+b)&(c+d-[c+d])+\\ a&(b+c+d-[b+c+d])+\\ -a&(b+c+d-[b+c+d])+\\ a&(b+c-[b+c])\\ =a&(b-d+[c+d]-[b+c]). \end{align}$$
How is $a(b-d+[c+d]-[b+c])$ equal to $0\mod{n^2}$?
The mistake in the original question is the following: $w'(a+b, c, d) = [a + b]\cdot (c + d - [c + d])$ instead of $(a + b)\cdot (c + d - [c + d])$. So, you should make each argument modulo $n$ before using the formula of the 3-cocycle. With this changes the formula is correct. Indeed: \begin{multline} w'(b, c, d) - w'(a+b, c, d) + w'(a, b+c, d) - w'(a, b, c+d) + w'(a, b, c) = \\ = b\cdot(c + d - [c+d]) - [a+b]\cdot(c+d-[c+d]) + a\cdot([b+c] + d - [b+c+d]) - \\ - a\cdot(b + [c+d] - [b+c+d]) + a(b+c - [b+c]) = \\ = (a+b)\cdot (c+d) + [a+b]\cdot [c+d] - (a + b)\cdot [c + d] - [a + b]\cdot (c + d) \end{multline}
This is quite symmetric expression. Let $a+b = \delta_{12} + [a+b]$ and $c+d = \delta_{34} + [c + d]$. Here $\delta_{12}, \delta_{34}\in\{0, n\}$, because the value $a + b$ can be less than $n$ (and in this case $\delta_{12} = 0$) or greater than $n$ (and in this case $\delta_{12} = n$). The situation with $c + d$ is the similar. Finally: \begin{multline} \delta^3(w')(a, b, c, d) = \delta_{12}\cdot \delta_{34} + \delta_{12}\cdot[c+d]+[a+b]\cdot \delta_{34} + [a+b]\cdot[c+d] - \\ - \delta_{12}\cdot[c+d] - [a+b]\cdot[c+d] - \delta_{34}\cdot[a+b] - [c+d]\cdot[a+b] + \\ + [a+b]\cdot[c+d] = \delta_{12}\cdot\delta_{34} = 0 (mod\ n^2). \end{multline}