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

Query time 0.00037

JSON explain

{
  "query_block": {
    "select_id": 1,
    "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 www.tochkasvyazi.test-handyhost.ru N Y N 5c93f90410e1df19abac2b171311e1be CS-Cart abt__unitheme2 N