where('es.is_allowed_auto_clockout', 1) ->whereNull('essentials_attendances.clock_out_time') ->whereBetween('es.auto_clockout_time', [Carbon::now()->toTimeString(), Carbon::now()->addMinutes(30)->toTimeString()]) ->update(['clock_out_time' => Carbon::now()->toDateTimeString()]); } }