LTD and Tritium (demand based, varies in real time), Fleet Carriers (fixed), and everything else (semi-fixed with a hidden "bulk sales fee").
1 Everything else: Demand and price will not change until the next daily server tick and only then if some condition like pirate attack, boom, public holiday, blight, etc changes. But there is a hidden "bulk sale fee" or "bulk sales tax" that can change the prices you get. To avoid this fee/tax multiply the demand at the station by 0.25 and don't carry more than that in the ship's cargo.
The demand at the station will appear to go down when you sell but will revert back to the original number when you leave and return (unless changed by a server tick in the mean time). This isn't a new mechanic just more noticeable now.
This mechanism gets triggered when you have more than 25% of current demand in your cargo hold. The "trigger percentage" have changed after the June 9th 2020 update from 4-5% to 25%.
The price reduction is strictly linear and directly proportional to how much you have, until you hit 80% of current demand. Any amount of cargo in excess of 80% of demand doesn't change the "bottom price". This "bottom price" seems to be somewhat random at different stations, and is observed to be between 55% and 30% of the full price.
This can also be verified by looking up Painite commodity price, for example, on Inara and hovering over any station that has a quantity listed in red. The little popup box will show the 25% number and explain not to carry any more than that.
2. Fleet Carriers: Demand and price are unchanged except when FC owner changes them, the FC is full, or the FC runs out of funds to fill orders. So there can be a discrepancy between displayed demand/price and actual demand/price.
3. LTD and Tritium: These prices and demand do change in real time so if there is a demand for 1000 LTD and four CMDRs sell 250 LTD each then the demand will now be 0 and the price and demand will fall as well after each of the four sales. Tritium works in reverse mostly as CMDRs are more interested in buying than selling. The demand/price doesn't appear to be exactly linear but for all practical purposes it might as well be. If you can't be there in the first hour or so after the server tick the public prices and demand will have collapsed. For this reason a lot of the LTD and Tritium data is now not on EDDB/Inara and is private.