UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zE0vVAlTiUnFZjHcoTazUDhrorMZ2HbfsAa1378rWik='
WHERE
key_id = 'f75c6681eedebab0dccb814ade56dc343943d27f2d4c43bc5b4bfdb8f05d0b06'
AND (
token = 'zE0vVAlTiUnFZjHcoTazUDhrorMZ2HbfsAa1378rWik='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)