where('status', 'active') ->whereNotNull('expires_at') ->where('expires_at', '<', now()) ->update(['status' => 'completed']); } }