How is the Gronwall lemma used in this paper? Let $(X_t, t \ge 0)$ be a $\mathbb R^d$-valued stochastic process. Let $\lambda>0$. Assume we have $\mathbb E [|X_0|^2] < \infty$ and
$$
\mathbb E [|X_t|^2] - \mathbb E [|X_0|^2] \le -2 \lambda \int_0^t \mathbb E [|X_s|^2] \, \mathrm d s + 2t (\lambda |\mathbb E [X_0]|^2 +1) \quad \forall t \ge 0.
$$
It is mentioned in the proof of Lemma 5.2 of the paper Convergence to equilibrium for granular media equations and their Euler schemes that

By Gronwall's lemma,
$$
\mathbb E [|X_t|^2] \le \bigg [ |\mathbb E [X_0]|^2 + \frac{1}{2\lambda} \bigg ] (1- e^{-2\lambda t}) + \mathbb E [|X_0|^2] e^{-2\lambda t}.
$$

Could you explain which form of the Gronwall lemma is used in the paper?

On the other hand, the form of Gronwall lemma on Wikipedia seems not applicable in this case, i.e.,

Let $I$ denote an interval of the real line of the form $[a, \infty)$ or $[a, b]$ or $[a, b)$ with $a<b$. Let $\alpha, \beta$ and $u$ be realvalued functions defined on $I$. Assume that $\beta$ and $u$ are continuous and that the negative part of $\alpha$ is integrable on every closed and bounded subinterval of $I$.

*

*(a) If $\beta$ is non-negative and if $u$ satisfies the integral inequality
$$
u(t) \leq \alpha(t)+\int_a^t \beta(s) u(s) \mathrm{d} s, \quad \forall t \in I,
$$
then
$$
u(t) \leq \alpha(t)+\int_a^t \alpha(s) \beta(s) \exp \left(\int_s^t \beta(r) \mathrm{d} r\right) \mathrm{d} s, \quad t \in I.
$$

*(b) If, in addition, the function $\alpha$ is non-decreasing, then
$$
u(t) \leq \alpha(t) \exp \left(\int_a^t \beta(s) \mathrm{d} s\right), \quad t \in I.
$$


Below is the screenshot I took from the paper.

 A: $\newcommand\al\alpha\newcommand\be\beta\newcommand\la\lambda$The reasoning in the paper is probably as follows:
For real $t\ge0$, letting
$$u(t):=2\la(E|X_t|^2-|EX_0|^2)-1,$$
$$\al(t):=-1+2\la(E|X_0|^2-|EX_0|^2),\quad\be(t):=-2\la,$$
rewrite your first displayed inequality as
$$
u(t) \leq \al(t)+\int_0^t \be(s) u(s) \,ds.
$$
Then your last display will be
$$u(t)\le e^{-2\la t}(-1+2\la(E|X_0|^2-|EX_0|^2)),$$
which is equivalent to the inequality in question (your first highlighted inequality).

However, in the conditions of Gronwall's lemma, $\be$ is required to be nonnegative, while $\be<0$ in our setting.
Moreover, in our setting, not only Gronwall's lemma is not applicable, but also the claimed inequality
$$E|X_t|^2\le\Big(|EX_0|^2+\frac1{2\la}\Big) (1-e^{-2\la t}) 
+ E|X_0|^2 e^{-2\la t}\tag{1}\label{1}$$
will fail to hold in general even when the condition
$$E|X_t|^2-E|X_0|^2\le-2\la\int_0^t E|X_s|^2 \, ds + 2t (\la|EX_0|^2+1)\tag{0}\label{0}$$
holds for all $t\ge0$.
Indeed, suppose e.g. that $\la=1$ and
$$E|X_t|^2=\frac{1}{2} e^{-2 t} \left(e^t (t-2)+3 e^{2 t}+1\right)\tag{3}\label{3}$$
and $|EX_0|^2=E|X_0|^2=1$; note that the right-hand side of \eqref{3} is $\ge1$ for $t\ge0$.
Then the difference between the right- and left-hand sides of \eqref{0} is $t+e^{-t} t/2\ge0$ for $t\ge0$, whereas the difference between the right- and left-hand sides of \eqref{1} is $e^{-2 t} \left(-e^t (t-2)-2\right)/2<0$ for (say) $t\ge2$. $\quad\Box$
