You can choose the order in CartoDB in two different ways: having the geometries in different layers and moving a layer on top of the other one, or ordering the results of your table.
CartoDB draws the geometries by using the cartodb_id index by default. This means that a line with cartodb_id = 10 will be always plotted on top of other one with cartodb_id=9. If you're building the visualization on runtime and getting the data from a query, the system will take into account if you have a ORDER BY statement applied. If so, geometries will be drawn in an ascendent way with respect to the statement key.
So, basically, you need to set up a query that returns your data in the order you need. You can use a column to give priority to your blue lines over some green ones, and use a ORDER BY over it.