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