Yeah, I think that should be doable. I haven't tested it, but the query should be something like this:
Code:
UPDATE items, spells_new SET items.price = (spells_new.mana * 40) WHERE items.scrolleffect = spells_new.id;
As always, it is recommended to do a DB or at least items table backup before running any queries you are not 100% sure about. If using Navicat, you can just right click the items table and make a copy of it from there (copy and paste), so you will have a backup in case something goes wrong with the price changes.