SELECT 
  storefronts.* 
FROM 
  tmall_storefronts AS storefronts 
WHERE 
  1 = 1 
  AND (
    storefronts.url = 'backend-dash.tmall.com.tn' 
    OR storefronts.url = 'www.backend-dash.tmall.com.tn' 
    OR storefronts.url LIKE 'www_.backend-dash.tmall.com.tn' 
    OR storefronts.url LIKE 'backend-dash.tmall.com.tn/%' 
    OR storefronts.url LIKE 'www.backend-dash.tmall.com.tn/%' 
    OR storefronts.url LIKE 'www_.backend-dash.tmall.com.tn/%'
  ) 
GROUP BY 
  storefronts.storefront_id 
ORDER BY 
  storefronts.url = 'backend-dash.tmall.com.tn' DESC, 
  storefronts.url = 'www.backend-dash.tmall.com.tn' DESC, 
  storefronts.url LIKE 'www_.backend-dash.tmall.com.tn' DESC, 
  storefronts.url LIKE 'backend-dash.tmall.com.tn/%' DESC, 
  storefronts.url LIKE 'www.backend-dash.tmall.com.tn/%' DESC, 
  storefronts.url LIKE 'www_.backend-dash.tmall.com.tn/%' desc

Query time 0.01327

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 backend-dash.tmall.com.tn N Y N CS-Cart abt__unitheme2 N