SELECT 
  COUNT(
    DISTINCT(cscart_order_details.order_id)
  ) as count, 
  cscart_orders.status as status 
FROM 
  cscart_orders 
  LEFT JOIN cscart_order_details ON cscart_order_details.order_id = cscart_orders.order_id 
WHERE 
  cscart_order_details.product_id = 1480 
GROUP by 
  status

Query time 0.00533

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4014.37"
    },
    "grouping_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "1615.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_orders",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY",
              "status"
            ],
            "rows_examined_per_scan": 1615,
            "rows_produced_per_join": 1615,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "138.37",
              "eval_cost": "323.00",
              "prefix_cost": "461.37",
              "data_read_per_join": "16M"
            },
            "used_columns": [
              "order_id",
              "status"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_order_details",
            "access_type": "ref",
            "possible_keys": [
              "o_k"
            ],
            "key": "o_k",
            "used_key_parts": [
              "order_id",
              "product_id"
            ],
            "key_length": "6",
            "ref": [
              "eshopuga_upgr_4122.cscart_orders.order_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1615,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "1615.00",
              "eval_cost": "323.00",
              "prefix_cost": "2399.37",
              "data_read_per_join": "365K"
            },
            "used_columns": [
              "order_id",
              "product_id"
            ]
          }
        }
      ]
    }
  }
}