What about joining the two tables?
SELECT DISTINCT SO.omlSalesOrderID
FROM m1_dc.dbo.SalesOrders AS SO
LEFT OUTER JOIN m1_dc.dbo.SalesOrderLines AS SOI
ON SO.ompSalesOrderID = SOI.ompSalesOrderID
WHERE SO.ompShippingMethodID='JBFM'
OR SOI.omlPartID='finalmile'