UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C4MHT7CP1GAOXxk/Ko/31Wd5L5rr0MdgaTtxJHzjjS0='
WHERE
key_id = '3b980d1ac2a36fef55baed74d1dc9b53aa780aa1719f608f1cfcb575f83cefdd'
AND (
token = 'C4MHT7CP1GAOXxk/Ko/31Wd5L5rr0MdgaTtxJHzjjS0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)