newQuery() ->whereKey($model->getKey()) ->lockForUpdate() ->first(); if ($locked === null) { return null; } return $callback($locked); }); } }