UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VlPvXVQpHdt/xetjCygZMmMnw99WwtgjsVxScMTAqhc='
WHERE
key_id = 'adb205f29d4a58709985d92cda9e5216d034ff4fb2dde30d5b9ec283a817e161'
AND (
token = 'VlPvXVQpHdt/xetjCygZMmMnw99WwtgjsVxScMTAqhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)