You can do this using the Update Multiple Rows feature.
First, you must test this on one stock item to ensure you have the results as you wish.
Go to the stock items in question – Inventory / stock items / find – and then select all and right click on the results.
Select Update Multiple Rows as below:
Category: Updating Multiple Records