you can use, for example, the approach that was explained here:
How to chose which line goes on top of the other line
Basically, in your CartoCSS code you can create some layers with different z indexes. For example:
/** simple visualization */
#untitled_table_17{
marker-fill-opacity: 0.9;
marker-line-color: #FFF;
marker-line-width: 1.5;
marker-line-opacity: 1;
marker-placement: point;
marker-type: ellipse;
marker-width: 10;
marker-fill: #FF6600;
marker-allow-overlap: true;
}
#untitled_table_17[name = 'type1']::z1{
marker-fill-opacity: 0.9;
marker-line-color: #FFF;
marker-line-width: 1.5;
marker-line-opacity: 1;
marker-placement: point;
marker-type: ellipse;
marker-width: 10;
marker-fill: #5CA2D1;
marker-allow-overlap: true;
}
#untitled_table_17[name = 'type2']::z2{
marker-fill-opacity: 0.9;
marker-line-color: #FFF;
marker-line-width: 1.5;
marker-line-opacity: 1;
marker-placement: point;
marker-type: ellipse;
marker-width: 10;
marker-fill: #229A00;
marker-allow-overlap: true;
}