SELECT 
  ip_id 
FROM 
  cscart_stat_ips 
WHERE 
  ip = 316809871 
  AND cscart_stat_ips.company_id = 1

Query time 0.05745

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4605.20"
    },
    "table": {
      "table_name": "cscart_stat_ips",
      "access_type": "ref",
      "possible_keys": [
        "company_id"
      ],
      "key": "company_id",
      "used_key_parts": [
        "company_id"
      ],
      "key_length": "4",
      "ref": [
        "const"
      ],
      "rows_examined_per_scan": 20611,
      "rows_produced_per_join": 2061,
      "filtered": "10.00",
      "cost_info": {
        "read_cost": "483.00",
        "eval_cost": "412.22",
        "prefix_cost": "4605.20",
        "data_read_per_join": "354K"
      },
      "used_columns": [
        "ip_id",
        "ip",
        "company_id"
      ],
      "attached_condition": "(`eshopuga_upgr_4122`.`cscart_stat_ips`.`ip` = 316809871)"
    }
  }
}

Result

ip_id
55017