  We are interested in the optimal control problem associated with certain
quadratic cost functionals depending on the solution $X=X^\alpha$ of the
stochastic mean-field type evolution equation in $\mathbb R^d$
$dX_t=b(t,X_t,\mathcal L(X_t),\alpha_t)dt+\sigma(t,X_t,\mathcal
L(X_t),\alpha_t)dW_t,$ $X_0\sim \mu$ given, under assumptions that enclose a
sytem of FitzHugh-Nagumo neuron networks, and where for practical purposes the
control $\alpha_t$ is deterministic. To do so, we assume that we are given a
drift coefficient that satisfies a one-sided Lipshitz condition, and that the
dynamics is subject to a (convex) level set constraint of the form
$\pi(X_t)\leq0$. The mathematical treatment we propose follows the lines of the
recent monograph of Carmona and Delarue for similar control problems with
Lipshitz coefficients. After addressing the existence of minimizers via a
martingale approach, we show a maximum principle and then numerically
investigate a gradient algorithm for the approximation of the optimal control.
