How to update a sequence column using single update statement
Here is a solution that can help you.

update foo set prio = prio+1 where prio &gt;= 6 order by prio desc;
insert into foo (prio) values(6);