Applying a CQL_FILTER to a WMS layer won't change any bounds property's value. A WMS layer is just images. So what you can do is issue a WFS GetFeature request with the same filter in parallel, parse the response and calculate the bounds from the bounds of each feature. Needless to say that this will be terribly slow if your filter result returns more than a few hundred features.