UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fTPo0qZV9R9Rv6Jtyb1d/dyd121/OgdEtbKs2YATpc0='
WHERE
key_id = '63a52a10960dbb6da88003bfcce3ea3f3f083ff1ede5d26f7587f0c559ba5f09'
AND (
token = 'fTPo0qZV9R9Rv6Jtyb1d/dyd121/OgdEtbKs2YATpc0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)