SELECT 
  c.*, 
  IF (c.location_id != 2574, 0, 1) as `default` 
FROM 
  cscart_bm_containers as c 
  INNER JOIN cscart_bm_locations as l ON c.location_id = l.location_id 
  AND l.is_default = 1 
  AND l.layout_id = 110 
WHERE 
  1 
  AND c.position IN ('TOP_PANEL', 'HEADER', 'FOOTER') 
  AND c.company_id = 0

Query time 0.00012

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "l",
      "access_type": "ALL",
      "possible_keys": ["PRIMARY"],
      "rows": 498,
      "filtered": 100,
      "attached_condition": "l.is_default = 1 and l.layout_id = 110"
    },
    "table": {
      "table_name": "c",
      "access_type": "ref",
      "possible_keys": [
        "location_id",
        "location_id_company_id",
        "location_id_position_company_id"
      ],
      "key": "location_id_company_id",
      "key_length": "7",
      "used_key_parts": ["location_id", "company_id"],
      "ref": ["staging2_wesave_com.l.location_id", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "c.position in ('TOP_PANEL','HEADER','FOOTER')"
    }
  }
}

Result

container_id location_id position width user_class linked_to_default status company_id default
10216 2549 TOP_PANEL 16 top-grid Y A 0 0
10217 2549 HEADER 16 header-grid Y A 0 0
10219 2549 FOOTER 16 ty-footer-grid Y A 0 0