SELECT 
  DISTINCT warehouse_id 
FROM 
  cscart_store_locations AS sl 
  INNER JOIN cscart_warehouses_products_amount AS wpa ON wpa.warehouse_id = sl.store_location_id 
  INNER JOIN cscart_ult_objects_sharing ON (
    cscart_ult_objects_sharing.share_object_id = sl.store_location_id 
    AND cscart_ult_objects_sharing.share_company_id = 1 
    AND cscart_ult_objects_sharing.share_object_type = 'store_locations'
  ) 
WHERE 
  wpa.product_id IN (113)

Query time 0.00046

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.05"
    },
    "duplicates_removal": {
      "using_temporary_table": true,
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "wpa",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "0.25",
              "eval_cost": "0.10",
              "prefix_cost": "0.35",
              "data_read_per_join": "16"
            },
            "used_columns": [
              "warehouse_id",
              "product_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "sl",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "store_location_id"
            ],
            "key_length": "3",
            "ref": [
              "test_uchur_k.wpa.warehouse_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "using_index": true,
            "distinct": true,
            "cost_info": {
              "read_cost": "0.25",
              "eval_cost": "0.10",
              "prefix_cost": "0.70",
              "data_read_per_join": "928"
            },
            "used_columns": [
              "store_location_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_ult_objects_sharing",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "share_object_id",
              "share_company_id",
              "share_object_type"
            ],
            "key_length": "159",
            "ref": [
              "test_uchur_k.wpa.warehouse_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "using_index": true,
            "distinct": true,
            "cost_info": {
              "read_cost": "0.25",
              "eval_cost": "0.10",
              "prefix_cost": "1.05",
              "data_read_per_join": "160"
            },
            "used_columns": [
              "share_company_id",
              "share_object_id",
              "share_object_type"
            ],
            "attached_condition": "(`test_uchur_k`.`cscart_ult_objects_sharing`.`share_object_id` = `test_uchur_k`.`wpa`.`warehouse_id`)"
          }
        }
      ]
    }
  }
}

Result

warehouse_id
28