UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nylIMyUoU5jt1zus1VghwuZc4bIftbMf81PJUjGPnyg='
WHERE
key_id = '8261b10ca23c3b4cbdf747d0b2725ad2c7d5e973318da55004a27507bff51e83'
AND (
token = 'nylIMyUoU5jt1zus1VghwuZc4bIftbMf81PJUjGPnyg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)