There's no updating involved in this. You always insert new row(s) of data to record each (unit) piece of information in a database. This provides an audit trail so that you can determine if a programming mistake, duplicate submission, or nefarious activity has altered an amount. Once the raw data has been recorded, you simply query to get any result or report based on that data.
You should have a product/item table. This is where the items are defined. The id column in this table is the item id that is used when storing data related to the items.
When someone selects items for an order and goes through the checkout process, one row is inserted into the order(s) table with the unique/one-time information about the order. The id column in this table is the order id that is used when storing data related to the order. A row for each item id in the order is inserted into the order_items table.
The stock table holds a separate row for each transaction that increases or decreases stock for each item id, other than what is recorded in the order_items table. If you order and receive stock of an item, you insert a row into the stock table, with a positive quantity, every time you receive stock. If any other type of event occurs that increases or decreases stock of an item - loss, breakage, samples given out, replacement items sent, items returned that are usable and returned to stock, ... a separate row of data is inserted into the stock table, every time one of these events occurs.
To get the current quantity for any item id(s), you would use the query I already posted.