Sorry to hear that didn’t work as hoped, @mjanwani. I’ve been doing some testing on my end and I don’t think it’s going to be possible to use SOSL in the API Request to do what you need.
As you can’t filter the name in the query perhaps you could get the name included in the output of the query. Then use an additional action to filter out the package IDs with names that aren’t a match for those that you were looking to select, then check the expiry dates.
For example this query:
SELECT Id, SubscriberPackageId, SubscriberPackage.Name
FROM InstalledSubscriberPackage
Would output line items with both the ID and the package name:

From there, you could use a Code by Zapier action to check the names output the corresponding ID for those that do match. Then you could make a query to check the expiration date of the packages with those IDs supplied by the Code step.
If that doesn’t work and you’re looking to carry out certain actions for when packages expire, or are due to expire, I wonder if a different approach might be needed. Perhaps a workaround would be to keep a record of all the expiry dates for each package in a Google Calendar. For example, you could have one Zap add a new “expiry” event when a new subscriber package is added. Then have another Zap trigger when the event starts (or X amount of time before it starts) then carry out the desired action(s).
Could that be a viable option here?