The documentation says this:
Bind a named statement parameter for ":x" placeholder resolution, with each "x" name matching a ":x" placeholder in the SQL statement.
Although you could infer otherwise, testing suggests that it indeed binds multiple placeholders that share a name.
The query in the sample situation would end up like this:
SELECT * FROM table WHERE colA = 'bar' OR colB = 'bar'