SELECT 
  product_id 
FROM 
  cscart_products 
WHERE 
  company_id = 5 
  AND status = 'A' 
  AND product_id NOT IN ('166', '161') 
ORDER BY 
  RAND() 
LIMIT 
  1

Query time 0.00088

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "rand()",
      "temporary_table": {
        "table": {
          "table_name": "cscart_products",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "status", "product_id"],
          "key": "status",
          "key_length": "3",
          "used_key_parts": ["status"],
          "rows": 87,
          "filtered": 100,
          "index_condition": "cscart_products.`status` = 'A' and cscart_products.product_id not in ('166','161')",
          "attached_condition": "cscart_products.company_id = 5"
        }
      }
    }
  }
}

Result

product_id
163