SELECT 
  COUNT(*) 
FROM 
  cscart_discussion_posts 
  LEFT JOIN cscart_discussion_messages ON cscart_discussion_messages.post_id = cscart_discussion_posts.post_id 
WHERE 
  cscart_discussion_posts.thread_id = 3791 
  AND cscart_discussion_messages.message <> '' 
  AND cscart_discussion_posts.status = 'A'

Query time 0.00124

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "0.79"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_discussion_posts",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "thread_id",
            "thread_id_2"
          ],
          "key": "thread_id",
          "used_key_parts": [
            "thread_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 2,
          "rows_produced_per_join": 0,
          "filtered": "12.50",
          "cost_info": {
            "read_cost": "0.50",
            "eval_cost": "0.03",
            "prefix_cost": "0.70",
            "data_read_per_join": "112"
          },
          "used_columns": [
            "post_id",
            "thread_id",
            "status"
          ],
          "attached_condition": "(`s2cart`.`cscart_discussion_posts`.`status` = 'A')"
        }
      },
      {
        "table": {
          "table_name": "cscart_discussion_messages",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "post_id"
          ],
          "key_length": "3",
          "ref": [
            "s2cart.cscart_discussion_posts.post_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 0,
          "filtered": "87.50",
          "cost_info": {
            "read_cost": "0.06",
            "eval_cost": "0.02",
            "prefix_cost": "0.79",
            "data_read_per_join": "5"
          },
          "used_columns": [
            "message",
            "post_id"
          ],
          "attached_condition": "(`s2cart`.`cscart_discussion_messages`.`message` <> '')"
        }
      }
    ]
  }
}

Result

COUNT(*)
2