SELECT 
  AVG (dr.rating_value) 
FROM 
  cscart_discussion_rating AS dr 
  LEFT JOIN cscart_discussion_posts AS dp ON dp.post_id = dr.post_id 
  LEFT JOIN cscart_discussion AS d ON d.thread_id = dp.thread_id 
WHERE 
  d.object_id = 15106 
  AND d.object_type = 'P' 
  AND type IN ('B', 'R') 
  AND dp.status = 'A' 
  AND dr.rating_value > 0

Query time 0.00031

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "d",
      "access_type": "const",
      "possible_keys": ["PRIMARY", "object_id"],
      "key": "object_id",
      "key_length": "6",
      "used_key_parts": ["object_id", "object_type"],
      "ref": ["const", "const"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "dp",
      "access_type": "ref",
      "possible_keys": ["PRIMARY", "thread_id", "thread_id_2"],
      "key": "thread_id_2",
      "key_length": "6",
      "used_key_parts": ["thread_id", "status"],
      "ref": ["const", "const"],
      "rows": 1,
      "filtered": 100,
      "index_condition": "dp.`status` = 'A'"
    },
    "table": {
      "table_name": "dr",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["post_id"],
      "ref": ["ymonline_livedata.dp.post_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "dr.rating_value > 0"
    }
  }
}

Result

AVG (dr.rating_value)