UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nuZfIePdvHpODLReCOh9W9FNx+IRPxuiQbDuxhBLC8A='
WHERE
key_id = '25a2bc72213f28e0eb82e2a4098a92d6cd43bccbe0342fa171b46ab75ab0525f'
AND (
token = 'nuZfIePdvHpODLReCOh9W9FNx+IRPxuiQbDuxhBLC8A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)