UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IGEgBenUYiuQTv/fP3A0PYwMluH8ZkoJR017Di8i2SU='
WHERE
key_id = '5585346607374858bc40a341a89b266796399c2f21ec278000741cccf3b5d14f'
AND (
token = 'IGEgBenUYiuQTv/fP3A0PYwMluH8ZkoJR017Di8i2SU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)