Wall Street isn't expecting President Donald Trump's proposed tariffs on Mexican imports to last more than a week, UBS' Art Cashin told CNBC on Thursday.

"The market is almost willing to tolerate it being imposed, but it will not tolerate it if it lasts," Cashin said after a week of gains on Wall Street. "They're assuming it may be too late to either postpone it or change it, so they'll get imposed. But they assume they'll come off within a week."

Stocks rose slightly Thursday shortly after the open as investors monitored global trade tensions. The Dow Jones Industrial Average and the S&P 500 were slightly higher, while the Nasdaq Composite was down fractionally.

Trump announced last week he's putting a 5% tariff on all Mexican goods starting Monday if Mexico doesn't substantially limit or stop the number of migrants crossing into the U.S. The tariffs, if enacted, will go up incrementally to 25% by October. U.S.-Mexican talks are scheduled to resume Thursday.

A Mexican trade official told CNBC last week that Mexico won't retaliate against Trump's tariffs until the threats seem more serious.

"We have to wait and see what the complete notification procedure from the U.S. to Mexico [is], and then assess how that would impact our commitments with the U.S.," said Guillermo Malpica, head of Mexico's Trade & NAFTA Office.

Immediately after Trump's announcement, which caught many by surprise, the Dow fell more than 350 points.

Mexico was the second-largest exporter of goods into the U.S. last year, according to the Office of the U.S. Trade Representative. Each year, the U.S. imports billions of dollars worth of transportation equipment, chemicals and other goods from Mexico.

For now, Cashin said "we're all on tweet alert" as the president comes back from a European trip.