UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/tvFP0W+4WH5Jp5dsY8AjeTxdwxrx8wu9OOTaVaGZmQ='
WHERE
key_id = '06709dabbe083330fe5058a9073f70d1a7c7b96e989582e2b2864bc9d21ce94a'
AND (
token = '/tvFP0W+4WH5Jp5dsY8AjeTxdwxrx8wu9OOTaVaGZmQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)