The right formula:
$$ S_{t+\Delta t} = S_t+(r-q)S_t \Delta t+\sigma\,S_t \sqrt{\Delta t}\,Z+\frac{1}{2}\sigma^2\Delta t(Z^2-1)*S_t $$
We can extract the formula from the Brownian motion equation (Wiener process):
$$ dS_t = (r-q) S_t dt + \sigma S_t dW_t $$
where $ W_t $ is Wienere process.
Applying Itô's lemma (r, q and $\sigma$ are constants) with $ f(S_t) = \ln(S_t) $ gives:
$$ df(S_t) = f^\prime(S_t)*dS_t + \frac{1}{2}f^{\prime\prime} (S_t) *(dS_t)^2 \\ $$
where $ (dS_t)^2 $ is the quadratic variation of the SDE: $ (dS_t)^2 = \, \sigma^2 \, S_t^2 \, d W_t^2 + 2 \sigma S_t^2 (r-q) \, d W_t \, d t + (r-q)^2 S_t^2 \, d t^2 $
When $ dt \to 0 $, $ dt $ converges to 0 faster than $ dW_t $,
since $ dW_t^2 = O(dt) $.
So the above infinitesimal can be simplified by: $ (dS_t)^2 = \sigma^2 S_t^2 dt $
$ df(S_t) = \frac{1}{S_t}\,dS_t + \frac{1}{2} (-S_t^{-2}) (S_t^2\sigma^2\,dt) = \frac{1}{S_t} \left( (r-q) S_t\,dt + \sigma S_t\,dW_t \right) - \frac{1}{2}\sigma^2\,dt = \\ =\left (r-q-\frac{1}{2}\sigma^2\ \right )\,dt + \sigma dW_t $
$$ d(ln S_t) = (r-q - \frac{1}{2}\sigma^2) dt + \sigma dW_t $$
$$ S_{t+\Delta t} = S_t * e^{\int\limits_t^{t+\Delta t}{(r - q - \frac{1}{2}\sigma^2)}dt + \int\limits_t^{t+\Delta t}{\sigma dW_u}} $$
taking integrals and decomposing the exponent to Maclaurin series up to the third term
$$ ≈ S_t * [1 + (r-q)\Delta t + \sigma \Delta W_t + \frac{1}{2}\sigma^2((\Delta W_t)^2 - \Delta t)] $$
where $ \Delta W_t = Z(0,1)*\sqrt{\Delta t}$, where $ Z(0,1) $ is a random variable from normal distribution
$$ S_{t+\Delta t} = S_t+(r-q)S_t \Delta t+\sigma\,S_t Z \sqrt{\Delta t} + \frac{1}{2}\sigma^2(Z^2-1) \Delta t*S_t $$
p.s.: user16891 forgot to multiply the last term by $ S_t $
p.s.s.: using the equation $ S_{t+\Delta t} = S_t * e^{(r - q) \Delta t + \sigma Z \sqrt{\Delta t} + \frac{1}{2}\sigma^2 (Z^2-1) \Delta t} $ for Monte-Carlo simulation can be faster (in python).
p.s.s.s.: more theory about $ dW $ you can find here (Course Notes on SDEs from Moscow State University, Russian language)