SELECT * FROM ip_properties WHERE prActive = 1 AND (prLocation LIKE '{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}Sofia{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}' OR prCity = 'Sofia' OR prZip = 'Sofia' OR prStreet LIKE '{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}Sofia{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}' OR prCountry = 'Sofia') AND (prLocation LIKE '{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}Bulgaria{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}' OR prCity = 'Bulgaria' OR prZip = 'Bulgaria' OR prStreet LIKE '{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}Bulgaria{536a9491e91aa32695f5d087f7534b6da36c1ac5980b9b36737fa9707c645b14}' OR prCountry = 'Bulgaria')