UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vn1z8DpxWP7YHrAC/hjaxBtuBQqGJZwt7KPDLKBKmdo='
WHERE
key_id = '91620387f915071f8a53afd5ad2c00ac5652ad0d47c2dcdb3f4e69ece46689ea'
AND (
token = 'Vn1z8DpxWP7YHrAC/hjaxBtuBQqGJZwt7KPDLKBKmdo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)