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

Query time 0.00015

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 dev.rbiz-marketplace.com N Y N rakuten dev.R-biz marketplace bright_theme_c N