SELECT 
  AVG(a.rating_value) as val 
FROM 
  cscart_discussion_rating as a 
  LEFT JOIN cscart_discussion_posts as b ON a.post_id = b.post_id 
WHERE 
  a.thread_id = 50044 
  AND b.status = 'A' 
  AND a.rating_value > 0

Query time 0.00043

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "a",
      "access_type": "ref",
      "possible_keys": ["PRIMARY", "thread_id"],
      "key": "thread_id",
      "key_length": "3",
      "used_key_parts": ["thread_id"],
      "ref": ["const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "a.rating_value > 0"
    },
    "table": {
      "table_name": "b",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["post_id"],
      "ref": ["cscart_migrate.a.post_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "b.`status` = 'A'"
    }
  }
}

Result

val