You should move the question to Products. "Community" is for issues with the Marketo Nation (this website) itself -- and yes, this is confusing!
The answer is that natively, this kind of cross-object interrogation is only possible in Velocity -- but by then, the Smart List membership has already been computed.
While FlowBoost (Pro) has a bridge that allows for custom objects to be crunched like this, even I (as the tech lead on ) think it's a bit far afield and you'd be better off rethinking your CO upsert setup instead (that is, linking to the DiscontinuedProduct instead of trying to compute the link at runtime).
Do you have a custom object built that contains items that are/or have been discontinued with a date and product number? Not sure if this information needs to be in a Marketo custom object.
Will this 'Discontinued products' information more like common to all the leads? This sounds like information that is 'external lookup table' sort of functionality. I think you could have used a 'webhook' mechanism to get the functionality you need. But webhooks can not directly loop through custom objects. Also, we can not pass custom objects to webhooks. And there are limitations on using API calls within a webhook calls.
Still, this might be still possible if you are ok with 'partial' automation. Meaning some manual steps...