UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5xXksoAsQ/ul/GEAPzUZLUGKSk4irtnuKjpT0uggyew='
WHERE
key_id = '578558fd20c7dbb6d7604bd72229ba6084bea6fdc2e1bbcd7c464e254d0c4eff'
AND (
token = '5xXksoAsQ/ul/GEAPzUZLUGKSk4irtnuKjpT0uggyew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)