UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V3O7u3Yiy61HNGzAz44GbdXbl016+skVHR/cLbCD5sU='
WHERE
key_id = '01e95990db23885a0900b2292f4309812198c53492cb34beb61ee6b9b9eb20df'
AND (
token = 'V3O7u3Yiy61HNGzAz44GbdXbl016+skVHR/cLbCD5sU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)