UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/qCFCzbgLRna5ZuM+244vBzRXkUnJ3vmByvTI2LFTAs='
WHERE
key_id = '4111c04070758bf3d79921a9cfed223f4c34ff307cd4649369c525655f437bdf'
AND (
token = '/qCFCzbgLRna5ZuM+244vBzRXkUnJ3vmByvTI2LFTAs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)