Searching here I've found two questions related and at the time, this wasn't possible.
how to create a conditional content_width for a wordpress theme?
And an alternative way via CSS described by Philip Arthur Moore (the code is also on Codex): What is the role and history of the $content_width global variable?
Since the questions mentioned are a little old, my question is if the versions released after mid 2013 have improved the function so we could use it with conditionals.