Let \(\mathfrak {R}\) be a ring containing a nontrivial idempotent with center \(\mathcal {Z}(\mathfrak {R})\). In the present article, it is shown that under certain restrictions every map \(\xi :\mathfrak {R}\rightarrow \mathfrak {R}\) (not necessarily additive) satisfying \(\xi ([[S, T], U])=[[\xi (S), T], U]+[[S,\xi (T)],\) \( U]+[[S, T],\xi (U)]\) for all \(S, T, U\in \mathfrak {R}\) with \(STU=0,\) is almost additive, that is, \(\xi (S+T)-\xi (S)-\xi (T)\in \mathcal {Z}(\mathfrak {R}).\) In addition, if \(\mathfrak {R}\) is a 2-torsion free prime ring, then \(\xi \) is of the form \(\xi =\partial +\eta ,\) where \(\partial \) is a derivation from \(\mathfrak {R}\) into its central closure \(\mathfrak {S}\) and \(\eta \) is a map from \(\mathfrak {R}\) into its extended centroid \(\mathfrak {C}\) such that \(\eta (S+T)-\eta (S)-\eta (T)\in \mathcal {Z}(\mathfrak {R})\) and \(\eta ([[S, T], U])=0\) for all \(S,T,U\in \mathfrak {R}\) with \(STU=0.\) The obtained results are then applied to standard operator algebras, factor von Neumann algebras and the algebra of all bounded linear operators.