SELECT 
  c.*, 
  IF (c.location_id != 56093, 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 = 1928 
WHERE 
  1 
  AND c.position IN ('TOP_PANEL', 'HEADER', 'FOOTER') 
  AND c.company_id = 0

Query time 0.01828

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "10880.25"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "l",
          "access_type": "ALL",
          "possible_keys": [
            "PRIMARY"
          ],
          "rows_examined_per_scan": 43207,
          "rows_produced_per_join": 432,
          "filtered": "1.00",
          "cost_info": {
            "read_cost": "8779.99",
            "eval_cost": "86.41",
            "prefix_cost": "8866.40",
            "data_read_per_join": "97K"
          },
          "used_columns": [
            "location_id",
            "is_default",
            "layout_id"
          ],
          "attached_condition": "((`webmarco`.`l`.`layout_id` = 1928) and (`webmarco`.`l`.`is_default` = 1))"
        }
      },
      {
        "table": {
          "table_name": "c",
          "access_type": "ref",
          "possible_keys": [
            "location_id",
            "location_id_company_id",
            "location_id_position_company_id"
          ],
          "key": "location_id",
          "used_key_parts": [
            "location_id"
          ],
          "key_length": "3",
          "ref": [
            "webmarco.l.location_id"
          ],
          "rows_examined_per_scan": 3,
          "rows_produced_per_join": 83,
          "filtered": "5.00",
          "cost_info": {
            "read_cost": "1678.21",
            "eval_cost": "16.78",
            "prefix_cost": "10880.25",
            "data_read_per_join": "33K"
          },
          "used_columns": [
            "container_id",
            "location_id",
            "position",
            "width",
            "user_class",
            "linked_to_default",
            "status",
            "company_id"
          ],
          "attached_condition": "((`webmarco`.`c`.`company_id` = 0) and (`webmarco`.`c`.`position` in ('TOP_PANEL','HEADER','FOOTER')))"
        }
      }
    ]
  }
}

Result

container_id location_id position width user_class linked_to_default status company_id default
224329 56074 TOP_PANEL 16 top-grid Y A 0 0
224330 56074 HEADER 16 header-grid et-full-grid Y A 0 0
224332 56074 FOOTER 16 ty-footer-grid Y A 0 0