UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B/GNoiySE+Zvx4B83ttCtp8Hnt8GJhswnkGVx3bBgPA='
WHERE
key_id = '6886703699b1d135bdb3c46b6819792944ab231de2867b77d8941dd58088bbbb'
AND (
token = 'B/GNoiySE+Zvx4B83ttCtp8Hnt8GJhswnkGVx3bBgPA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)