vm_id || ! $service->expires_at) { return 0; } $timestamp = $service->expires_at->timestamp; return ModuleVmware::query() ->whereKey($service->vm_id) ->where(fn ($query) => $query->whereNull('next_due_date')->orWhere('next_due_date', '!=', $timestamp)) ->update(['next_due_date' => $timestamp]); } }