Can you use conditional formatting to decide to lock a cell?

Something similiar to:
(the following only pretends to be a photocopy of a formula, it is not a real formula, do not use near open flame or underwater)

IF A1=ISBLANK ... Lock A1, IF A1=ISNOTBLANK ... Lock B1