SELECT 
  storefronts.* 
FROM 
  cscart_storefronts AS storefronts 
WHERE 
  1 = 1 
  AND (
    storefronts.url = 'order2buy.com' 
    OR storefronts.url = 'www.order2buy.com' 
    OR storefronts.url LIKE 'www_.order2buy.com' 
    OR storefronts.url LIKE 'order2buy.com/%' 
    OR storefronts.url LIKE 'www.order2buy.com/%' 
    OR storefronts.url LIKE 'www_.order2buy.com/%'
  ) 
GROUP BY 
  storefronts.storefront_id 
ORDER BY 
  storefronts.url = 'order2buy.com' DESC, 
  storefronts.url = 'www.order2buy.com' DESC, 
  storefronts.url LIKE 'www_.order2buy.com' DESC, 
  storefronts.url LIKE 'order2buy.com/%' DESC, 
  storefronts.url LIKE 'www.order2buy.com/%' DESC, 
  storefronts.url LIKE 'www_.order2buy.com/%' desc

Query time 0.00021

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "storefronts",
          "access_type": "system",
          "rows": 1,
          "filtered": 100
        }
      }
    ]
  }
}

Result

storefront_id url redirect_customer is_default status access_key name theme_name is_accessible_for_authorized_customers_only
1 order2buy.com N Y N d51f8eda765c82cce79afad3fa24cc79 CS-Cart abt__unitheme2 N