UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9JLVcIrUAsh3y2nxHtHuaMsJ4Ff3O5Ejm6KlvzGtKJo='
WHERE
key_id = '0b4c6efe5a2af77e48347fea10f289709d9dda35519a76f0e3a3e67430c0206f'
AND (
token = '9JLVcIrUAsh3y2nxHtHuaMsJ4Ff3O5Ejm6KlvzGtKJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)