A billboard ad for a Mexican beer will be withdrawn at the end of the month amid accusations that it was sexist and racist.