UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AOLJaQVoF3JdCU+wQBNWr2r27TiOZoX+E3wSxIgpR/w='
WHERE
key_id = 'b2066e65c36b276af59a8fb432d12462cf16bc2c4710c67feb0c815808d267ea'
AND (
token = 'AOLJaQVoF3JdCU+wQBNWr2r27TiOZoX+E3wSxIgpR/w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)